import 'package:base_flutter/base_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:ls_work/viewmodel/new_activity/activity_info_detal_view_model.dart';

class ActivityWidget{

  static List<Widget> activityIndfoWidget(List<TitleValue> list){
    return list.map((e) {
      return e.type == 0
          ? Row(
        children: [
          CommonText(e.title),
          CommonText(e.value).setWeight(1)
        ],
      ).addToContainer(
          margin: EdgeInsets.symmetric(horizontal: 16, vertical: 10))
          : Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          CommonText(e.title),
          Container(
            height: 10,
          ),
          CommonText(e.value)
        ],
      ).addToContainer(
          margin: EdgeInsets.symmetric(horizontal: 16, vertical: 10));
    }).toList();
  }
}